import Vue from 'vue'
import App from './App.vue'
import router from './router'
import './plugins/element.js'
import axios from "axios";

Vue.config.productionTip = false
Vue.prototype.$http=axios

//设置axios异步请求拦截器
axios.interceptors.request.use(config=>{
  var token=localStorage.getItem("token");
  if(token){
    config.headers.token=token;
  }
  return config;
})

new Vue({
  router,
  render: h => h(App)
}).$mount('#app')
